package org.go.scheduler.database;

import org.go.scheduler.ScheduleBuilder;
import org.go.trigger.Trigger;

public class SimpleScheduleBuilder extends ScheduleBuilder<Trigger> {
	public static SimpleScheduleBuilder simpleSchedule() {
		return new SimpleScheduleBuilder();
	}

	private long interval = 0;
	private int misfireInstruction = Trigger.MISFIRE_INSTRUCTION_SMART_POLICY;

	private int repeatCount = 0;

	public SimpleScheduleBuilder withIntervalInMilliseconds(long intervalInSeconds) {
		this.interval = intervalInSeconds * 1000L;
		return this;
	}

	public ScheduleBuilder withIntervalInSeconds(int intervalInSeconds) {
		this.interval = intervalInSeconds;
		return this;
	}

	public SimpleScheduleBuilder withRepeatCount(int repeatCount) {
		this.repeatCount = repeatCount;
		return this;
	}
}
